package com.xuanrui.search;

import com.xuanrui.pubInter.BaseSearch;
import lombok.Data;

import java.util.List;

/**
 * @author afeng
 * @version 1.0
 * @date 2023/2/17 下午2:08
 */
@Data
public class ChargeRecordsSearch extends BaseSearch {
    @Override
    public String getIdFiled() {
        return "_id";
    }

    private String orderNumEq;


    private String playerNameLike;

    private List<Object> playerIdIn;

    private String thirdPayIdEq;//第三方id

    private String thirdOutTransIdLike; //微信交易单号
    private String thirdPartyOrderIdLike; // 微信商户单号

    public ChargeRecordsSearch setThirdOutTransIdLike(String thirdOutTransIdLike) {
        this.thirdOutTransIdLike = thirdOutTransIdLike;
        and("third_out_trans_id").in(thirdOutTransIdLike);
        return this;
    }
    public ChargeRecordsSearch setThirdPartyOrderIdLike(String thirdPartyOrderIdLike) {
        this.thirdPartyOrderIdLike= thirdPartyOrderIdLike;
        and("third_party_order_id").in(thirdPartyOrderIdLike);
        return this;
    }


    public ChargeRecordsSearch setPlayerIdIn(List<Object> playerIdIn) {
        this.playerIdIn = playerIdIn;
        and("pay_player_id").in(playerIdIn);
        return this;
    }

    public  ChargeRecordsSearch setOrderNumEq(String orderNumEq) {
        this.orderNumEq = orderNumEq;
        and("order_no").is(orderNumEq);
        return this;
    }
    public  ChargeRecordsSearch setThirdPayIdEq(String thirdPayIdEq) {
        this.thirdPayIdEq = thirdPayIdEq;
        and("third_pay_id").is(thirdPayIdEq);
        return this;
    }
}
